<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/6/7
  Time: 7:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="/wechat/ucenter/addrManager.css">
    <jsp:include page="../public/head.jsp" flush="true" />
</head>
<body>
<jsp:include page="../public/header.jsp" flush="true" />

<section>
    <div class="my_addrMa">
        <c:forEach items="${addresses}" var="item" varStatus="statu">
            <a onclick="choose('${item.id}')">
            <div class="cont ">
                <div class="tit"><span class="s1">${item.consignee}</span><span class="s2">${item.phone}</span></div>
                <div class="txt">${item.address}</div>
            </div>
            </a>
        </c:forEach>
    </div>
</section>
<script>
    function choose(id) {
        $.post("/ucenter/chooseAddress.do",{id:id},function (data) {
            if (!data.success){
                tip("",data.msg,true);
            }else {
//                window.location.href = "/order/orderList.do";
//                window.history.go(-2);
                window.location.replace("/home/shopCar.do");
            }
        },"json");
    }
</script>
<footer>
    <div  class="my_ocupie"></div>
</footer>
</body>
</html>
